#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/ioctl.h>
#include <string.h>

#include "char_driver.h"

int main(int argc, char const *argv[])
{
    if (argc < 2){
        printf("errno=%d\n",errno);
        fprintf(stderr,"[file:%s] [func:%s] [line:%d]\n",__FILE__,__func__,__LINE__);
        return -1;
    }

    int fd = open(argv[1], O_RDWR);
    if(fd < 0){
        printf("errno=%d\n",errno);
        fprintf(stderr,"[file:%s] [func:%s] [line:%d]\n",__FILE__,__func__,__LINE__);
        return -1;
    }

    while(1);

    close(fd);
    return 0;
}

